/*
 *  Copyright (C) 2010 Glauco
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.builder;

import java.lang.reflect.Field;
import org.balisunrise.annotation.util.CriteriaUtilities;
import org.balisunrise.common.FilterField;

/**
 * Esta Interface é responsável pela construção de filtros de uma entidade.
 *
 * @author Glauco
 */
public interface FilterFieldBuilder {

    /**
     * Cria um FilterField a partir de um Field de uma entidade e o alias
     * para construção do Filtro.<br>
     *
     * @param field campo de uma entidade.
     * @param alias Alias para construção do filtro.
     * @return um FilterField.
     * @throws BuilderException
     */
    public FilterField buildFilterField(Field field, String alias)
            throws BuilderException;

    /**
     * Cria um FilterField a partir FieldUtilities.<br>
     *
     * @param fieldUtilities Utilitário para construir o filtro.
     * @return um FilterField.
     * @throws BuilderException
     */
    public FilterField buildFilterField(CriteriaUtilities criteriaUtilities)
            throws BuilderException;
}
